package com.elong.qadev.compiler;
 
import java.net.URLClassLoader;
import java.net.URL;
/**
 * 
* @ClassName: DynamicClassLoader
* @Description: TODO()
* @author kangchen
* @date 2015年10月15日
*
 */
public class DynamicClassLoader extends URLClassLoader {
    public DynamicClassLoader(ClassLoader parent) {
        super(new URL[0], parent);
    }
 
    public Class<?> findClassByClassName(String className) throws ClassNotFoundException {
        return this.findClass(className);
    }
 
    public Class<?> loadClass(String fullName, JavaClassObject jco) {
        byte[] classData = jco.getBytes();
        return this.defineClass(fullName, classData, 0, classData.length);
    }
}